<template>
  <div id="container">
    <div id="login_container" style="" class="qrCode"> </div>
  </div>
</template>

<script setup lang="ts">
  import dingtalk from './ddtalk.ts'
  import { onMounted } from 'vue'
  let goto = encodeURIComponent(
    'https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingfiesdgu1kmemgty2&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=https://hg-partner-admin.huidatech.cn',
  )
  let tmpAuthCode = window.location.search.split('&')[0].split('=')[1]

  onMounted(() => {
    window.location.href =
      'https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingfiesdgu1kmemgty2&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=https://hg-partner-admin.huidatech.cn'
    // dingtalk.init('login_container', () => {

    //   })
  })
</script>
<style scoped lang="scss">
  /* STEP2：指定这个包裹容器元素的CSS样式，尤其注意宽高的设置 */
  .self-defined-classname {
    width: 300px;
    height: 300px;
  }
  #container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  #login_container {
    display: flex;
    align-items: center;
    justify-content: center;
  }
</style>
